<?php
/** 
  * @desc this file position effect board_config file some config, $config['public_html'],etc.
  *
  */
date_default_timezone_set("Asia/Shanghai");
$start = microtime(true);

$ds = DIRECTORY_SEPARATOR; 
require_once(dirname(dirname(__FILE__)).$ds."include".$ds."global.inc.php");
//run application
require_once(dirname(dirname(dirname(__FILE__))).$ds."system".$ds."core".$ds."application.php");
//NICED_Application::execute();
NICED_Application::init();

//controller
$controller = new NICED_Controller();

//model
$model_name = "Sample.Index";
$model      = $controller->getModel($model_name);
$model->hello();
echo "message from model is : ".$model->get("message")."\r\n";

//action
$action_name = "Sample.Index";
//init request
$request      = NICED_Request::getInstance();
$action_name = "Sample.Index";
$action = $controller->instantiate($action_name, "action", $controller);
$result = $action->execute();
echo "execute action result is : ".$result."\r\n";

$end = (microtime(true) - $start) * 1000;
$spend_time = $end - $start;//ms
